-- resolutionTable module
-- By Rafael M. Savelli - september 2nd 2009.

-- resolutionTable class.
ResolutionTable = {
	table = {}
}
-- resolutionTable class attributes.
function ResolutionTable:new(o)
	o = o or {}
	setmetatable(o, self)
	self.__index = self
	
	self.table[0] = {}
	self.table[0][0] = 0
	self.table[0][1] = 0
	self.table[0][2] = 0
	self.table[0][3] = 0
	self.table[0][4] = 0
	self.table[0][5] = 0
	self.table[0][6] = 0
	self.table[0][7] = 0
	self.table[0][8] = 0
	self.table[0][9] = 0
	self.table[0][10] = 0
	self.table[0][11] = 0
self.table[0][12] = 0
self.table[0][13] = 0
self.table[0][14] = 0.25
self.table[0][15] = 0.25
self.table[0][16] = 0.5
self.table[0][17] = 0.75
self.table[0][18] = 1
self.table[0][19] = 1.25

self.table[1] = {}
self.table[1][0] = 0
self.table[1][1] = 0
self.table[1][2] = 0
self.table[1][3] = 0
self.table[1][4] = 0
self.table[1][5] = 0
self.table[1][6] = 0
self.table[1][7] = 0
self.table[1][8] = 0
self.table[1][9] = 0
self.table[1][10] = 0
self.table[1][11] = 0
self.table[1][12] = 0
self.table[1][13] = 0.25
self.table[1][14] = 0.25
self.table[1][15] = 0.25
self.table[1][16] = 0.5
self.table[1][17] = 0.75
self.table[1][18] = 1
self.table[1][19] = 1.25

self.table[2] = {}
self.table[2][0] = 0
self.table[2][1] = 0
self.table[2][2] = 0
self.table[2][3] = 0
self.table[2][4] = 0
self.table[2][5] = 0
self.table[2][6] = 0
self.table[2][7] = 0
self.table[2][8] = 0
self.table[2][9] = 0
self.table[2][10] = 0
self.table[2][11] = 0
self.table[2][12] = 0.25
self.table[2][13] = 0.25
self.table[2][14] = 0.25
self.table[2][15] = 0.5
self.table[2][16] = 0.5
self.table[2][17] = 0.75
self.table[2][18] = 1
self.table[2][19] = 1.25

self.table[3] = {}
self.table[3][0] = 0
self.table[3][1] = 0
self.table[3][2] = 0
self.table[3][3] = 0
self.table[3][4] = 0
self.table[3][5] = 0
self.table[3][6] = 0
self.table[3][7] = 0
self.table[3][8] = 0
self.table[3][9] = 0
self.table[3][10] = 0
self.table[3][11] = 0.25
self.table[3][12] = 0.25
self.table[3][13] = 0.25
self.table[3][14] = 0.25
self.table[3][15] = 0.5
self.table[3][16] = 0.5
self.table[3][17] = 0.75
self.table[3][18] = 1
self.table[3][19] = 1.25

self.table[4] = {}
self.table[4][0] = 0
self.table[4][1] = 0
self.table[4][2] = 0
self.table[4][3] = 0
self.table[4][4] = 0
self.table[4][5] = 0
self.table[4][6] = 0
self.table[4][7] = 0
self.table[4][8] = 0
self.table[4][9] = 0
self.table[4][10] = 0.25
self.table[4][11] = 0.25
self.table[4][12] = 0.25
self.table[4][13] = 0.25
self.table[4][14] = 0.5
self.table[4][15] = 0.5
self.table[4][16] = 0.5
self.table[4][17] = 0.75
self.table[4][18] = 1
self.table[4][19] = 1.25

self.table[5] = {}
self.table[5][0] = 0
self.table[5][1] = 0
self.table[5][2] = 0
self.table[5][3] = 0
self.table[5][4] = 0
self.table[5][5] = 0
self.table[5][6] = 0
self.table[5][7] = 0
self.table[5][8] = 0
self.table[5][9] = 0
self.table[5][10] = 0.25
self.table[5][11] = 0.25
self.table[5][12] = 0.25
self.table[5][13] = 0.25
self.table[5][14] = 0.5
self.table[5][15] = 0.5
self.table[5][16] = 0.75
self.table[5][17] = 0.75
self.table[5][18] = 1
self.table[5][19] = 1.25

self.table[6] = {}
self.table[6][0] = 0
self.table[6][1] = 0
self.table[6][2] = 0
self.table[6][3] = 0
self.table[6][4] = 0
self.table[6][5] = 0
self.table[6][6] = 0
self.table[6][7] = 0
self.table[6][8] = 0
self.table[6][9] = 0.25
self.table[6][10] = 0.25
self.table[6][11] = 0.25
self.table[6][12] = 0.25
self.table[6][13] = 0.5
self.table[6][14] = 0.5
self.table[6][15] = 0.5
self.table[6][16] = 0.75
self.table[6][17] = 0.75
self.table[6][18] = 1
self.table[6][19] = 1.25

self.table[7] = {}
self.table[7][0] = 0
self.table[7][1] = 0
self.table[7][2] = 0
self.table[7][3] = 0
self.table[7][4] = 0
self.table[7][5] = 0
self.table[7][6] = 0
self.table[7][7] = 0
self.table[7][8] = 0
self.table[7][9] = 0.25
self.table[7][10] = 0.25
self.table[7][11] = 0.25
self.table[7][12] = 0.25
self.table[7][13] = 0.5
self.table[7][14] = 0.5
self.table[7][15] = 0.75
self.table[7][16] = 0.75
self.table[7][17] = 0.75
self.table[7][18] = 1
self.table[7][19] = 1.25

self.table[8] = {}
self.table[8][0] = 0
self.table[8][1] = 0
self.table[8][2] = 0
self.table[8][3] = 0
self.table[8][4] = 0
self.table[8][5] = 0
self.table[8][6] = 0
self.table[8][7] = 0
self.table[8][8] = 0.25
self.table[8][9] = 0.25
self.table[8][10] = 0.25
self.table[8][11] = 0.25
self.table[8][12] = 0.5
self.table[8][13] = 0.5
self.table[8][14] = 0.5
self.table[8][15] = 0.75
self.table[8][16] = 0.75
self.table[8][17] = 0.75
self.table[8][18] = 1
self.table[8][19] = 1.25

self.table[9] = {}
self.table[9][0] = 0
self.table[9][1] = 0
self.table[9][2] = 0
self.table[9][3] = 0
self.table[9][4] = 0
self.table[9][5] = 0
self.table[9][6] = 0
self.table[9][7] = 0
self.table[9][8] = 0.25
self.table[9][9] = 0.25
self.table[9][10] = 0.25
self.table[9][11] = 0.25
self.table[9][12] = 0.5
self.table[9][13] = 0.5
self.table[9][14] = 0.5
self.table[9][15] = 0.75
self.table[9][16] = 0.75
self.table[9][17] = 1
self.table[9][18] = 1
self.table[9][19] = 1.25

self.table[10] = {}
self.table[10][0] = 0
self.table[10][1] = 0
self.table[10][2] = 0
self.table[10][3] = 0
self.table[10][4] = 0
self.table[10][5] = 0
self.table[10][6] = 0
self.table[10][7] = 0.25
self.table[10][8] = 0.25
self.table[10][9] = 0.25
self.table[10][10] = 0.25
self.table[10][11] = 0.5
self.table[10][12] = 0.5
self.table[10][13] = 0.5
self.table[10][14] = 0.75
self.table[10][15] = 0.75
self.table[10][16] = 0.75
self.table[10][17] = 1
self.table[10][18] = 1
self.table[10][19] = 1.25

self.table[11] = {}
self.table[11][0] = 0
self.table[11][1] = 0
self.table[11][2] = 0
self.table[11][3] = 0
self.table[11][4] = 0
self.table[11][5] = 0
self.table[11][6] = 0
self.table[11][7] = 0.25
self.table[11][8] = 0.25
self.table[11][9] = 0.25
self.table[11][10] = 0.25
self.table[11][11] = 0.5
self.table[11][12] = 0.5
self.table[11][13] = 0.5
self.table[11][14] = 0.75
self.table[11][15] = 0.75
self.table[11][16] = 0.75
self.table[11][17] = 1
self.table[11][18] = 1
self.table[11][19] = 1.25

self.table[12] = {}
self.table[12][0] = 0
self.table[12][1] = 0
self.table[12][2] = 0
self.table[12][3] = 0
self.table[12][4] = 0
self.table[12][5] = 0
self.table[12][6] = 0.25
self.table[12][7] = 0.25
self.table[12][8] = 0.25
self.table[12][9] = 0.25
self.table[12][10] = 0.5
self.table[12][11] = 0.5
self.table[12][12] = 0.5
self.table[12][13] = 0.5
self.table[12][14] = 0.75
self.table[12][15] = 0.75
self.table[12][16] = 0.75
self.table[12][17] = 1
self.table[12][18] = 1
self.table[12][19] = 1.25

self.table[13] = {}
self.table[13][0] = 0
self.table[13][1] = 0
self.table[13][2] = 0
self.table[13][3] = 0
self.table[13][4] = 0
self.table[13][5] = 0
self.table[13][6] = 0.25
self.table[13][7] = 0.25
self.table[13][8] = 0.25
self.table[13][9] = 0.25
self.table[13][10] = 0.5
self.table[13][11] = 0.5
self.table[13][12] = 0.5
self.table[13][13] = 0.75
self.table[13][14] = 0.75
self.table[13][15] = 0.75
self.table[13][16] = 1
self.table[13][17] = 1
self.table[13][18] = 1
self.table[13][19] = 1.25

self.table[14] = {}
self.table[14][0] = 0
self.table[14][1] = 0
self.table[14][2] = 0
self.table[14][3] = 0
self.table[14][4] = 0
self.table[14][5] = 0.25
self.table[14][6] = 0.25
self.table[14][7] = 0.25
self.table[14][8] = 0.25
self.table[14][9] = 0.5
self.table[14][10] = 0.5
self.table[14][11] = 0.5
self.table[14][12] = 0.5
self.table[14][13] = 0.75
self.table[14][14] = 0.75
self.table[14][15] = 0.75
self.table[14][16] = 1
self.table[14][17] = 1
self.table[14][18] = 1
self.table[14][19] = 1.25

self.table[15] = {}
self.table[15][0] = 0
self.table[15][1] = 0
self.table[15][2] = 0
self.table[15][3] = 0
self.table[15][4] = 0
self.table[15][5] = 0.25
self.table[15][6] = 0.25
self.table[15][7] = 0.25
self.table[15][8] = 0.25
self.table[15][9] = 0.5
self.table[15][10] = 0.5
self.table[15][11] = 0.5
self.table[15][12] = 0.5
self.table[15][13] = 0.75
self.table[15][14] = 0.75
self.table[15][15] = 0.75
self.table[15][16] = 1
self.table[15][17] = 1
self.table[15][18] = 1
self.table[15][19] = 1.25

self.table[16] = {}
self.table[16][0] = 0
self.table[16][1] = 0
self.table[16][2] = 0
self.table[16][3] = 0
self.table[16][4] = 0.25
self.table[16][5] = 0.25
self.table[16][6] = 0.25
self.table[16][7] = 0.25
self.table[16][8] = 0.5
self.table[16][9] = 0.5
self.table[16][10] = 0.5
self.table[16][11] = 0.5
self.table[16][12] = 0.75
self.table[16][13] = 0.75
self.table[16][14] = 0.75
self.table[16][15] = 0.75
self.table[16][16] = 1
self.table[16][17] = 1
self.table[16][18] = 1
self.table[16][19] = 1.25

self.table[17] = {}
self.table[17][0] = 0
self.table[17][1] = 0
self.table[17][2] = 0
self.table[17][3] = 0
self.table[17][4] = 0.25
self.table[17][5] = 0.25
self.table[17][6] = 0.25
self.table[17][7] = 0.25
self.table[17][8] = 0.5
self.table[17][9] = 0.5
self.table[17][10] = 0.5
self.table[17][11] = 0.5
self.table[17][12] = 0.75
self.table[17][13] = 0.75
self.table[17][14] = 0.75
self.table[17][15] = 1
self.table[17][16] = 1
self.table[17][17] = 1
self.table[17][18] = 1
self.table[17][19] = 1.25

self.table[18] = {}
self.table[18][0] = 0
self.table[18][1] = 0
self.table[18][2] = 0
self.table[18][3] = 0.25
self.table[18][4] = 0.25
self.table[18][5] = 0.25
self.table[18][6] = 0.25
self.table[18][7] = 0.5
self.table[18][8] = 0.5
self.table[18][9] = 0.5
self.table[18][10] = 0.5
self.table[18][11] = 0.5
self.table[18][12] = 0.75
self.table[18][13] = 0.75
self.table[18][14] = 0.75
self.table[18][15] = 1
self.table[18][16] = 1
self.table[18][17] = 1
self.table[18][18] = 1
self.table[18][19] = 1.25

self.table[19] = {}
self.table[19][0] = 0
self.table[19][1] = 0
self.table[19][2] = 0
self.table[19][3] = 0.25
self.table[19][4] = 0.25
self.table[19][5] = 0.25
self.table[19][6] = 0.25
self.table[19][7] = 0.5
self.table[19][8] = 0.5
self.table[19][9] = 0.5
self.table[19][10] = 0.5
self.table[19][11] = 0.75
self.table[19][12] = 0.75
self.table[19][13] = 0.75
self.table[19][14] = 0.75
self.table[19][15] = 1
self.table[19][16] = 1
self.table[19][17] = 1
self.table[19][18] = 1
self.table[19][19] = 1.25

self.table[20] = {}
self.table[20][0] = 0
self.table[20][1] = 0
self.table[20][2] = 0.25
self.table[20][3] = 0.25
self.table[20][4] = 0.25
self.table[20][5] = 0.25
self.table[20][6] = 0.5
self.table[20][7] = 0.5
self.table[20][8] = 0.5
self.table[20][9] = 0.5
self.table[20][10] = 0.5
self.table[20][11] = 0.75
self.table[20][12] = 0.75
self.table[20][13] = 0.75
self.table[20][14] = 0.75
self.table[20][15] = 1
self.table[20][16] = 1
self.table[20][17] = 1
self.table[20][18] = 1
self.table[20][19] = 1.25

self.table[21] = {}
self.table[21][0] = 0
self.table[21][1] = 0
self.table[21][2] = 0.25
self.table[21][3] = 0.25
self.table[21][4] = 0.25
self.table[21][5] = 0.25
self.table[21][6] = 0.5
self.table[21][7] = 0.5
self.table[21][8] = 0.5
self.table[21][9] = 0.5
self.table[21][10] = 0.5
self.table[21][11] = 0.75
self.table[21][12] = 0.75
self.table[21][13] = 0.75
self.table[21][14] = 1
self.table[21][15] = 1
self.table[21][16] = 1
self.table[21][17] = 1
self.table[21][18] = 1
self.table[21][19] = 1.25

self.table[22] = {}
self.table[22][0] = 0
self.table[22][1] = 0.25
self.table[22][2] = 0.25
self.table[22][3] = 0.25
self.table[22][4] = 0.25
self.table[22][5] = 0.5
self.table[22][6] = 0.5
self.table[22][7] = 0.5
self.table[22][8] = 0.5
self.table[22][9] = 0.5
self.table[22][10] = 0.75
self.table[22][11] = 0.75
self.table[22][12] = 0.75
self.table[22][13] = 0.75
self.table[22][14] = 1
self.table[22][15] = 1
self.table[22][16] = 1
self.table[22][17] = 1
self.table[22][18] = 1
self.table[22][19] = 1.25

self.table[23] = {}
self.table[23][0] = 0
self.table[23][1] = 0.25
self.table[23][2] = 0.25
self.table[23][3] = 0.25
self.table[23][4] = 0.25
self.table[23][5] = 0.5
self.table[23][6] = 0.5
self.table[23][7] = 0.5
self.table[23][8] = 0.5
self.table[23][9] = 0.5
self.table[23][10] = 0.75
self.table[23][11] = 0.75
self.table[23][12] = 0.75
self.table[23][13] = 0.75
self.table[23][14] = 1
self.table[23][15] = 1
self.table[23][16] = 1
self.table[23][17] = 1
self.table[23][18] = 1
self.table[23][19] = 1.25

self.table[24] = {}
self.table[24][0] = 0
self.table[24][1] = 0.25
self.table[24][2] = 0.25
self.table[24][3] = 0.25
self.table[24][4] = 0.5
self.table[24][5] = 0.5
self.table[24][6] = 0.5
self.table[24][7] = 0.5
self.table[24][8] = 0.5
self.table[24][9] = 0.5
self.table[24][10] = 0.75
self.table[24][11] = 0.75
self.table[24][12] = 0.75
self.table[24][13] = 0.75
self.table[24][14] = 1
self.table[24][15] = 1
self.table[24][16] = 1
self.table[24][17] = 1
self.table[24][18] = 1
self.table[24][19] = 1.25

self.table[25] = {}
self.table[25][0] = 0
self.table[25][1] = 0.25
self.table[25][2] = 0.25
self.table[25][3] = 0.25
self.table[25][4] = 0.5
self.table[25][5] = 0.5
self.table[25][6] = 0.5
self.table[25][7] = 0.5
self.table[25][8] = 0.5
self.table[25][9] = 0.75
self.table[25][10] = 0.75
self.table[25][11] = 0.75
self.table[25][12] = 0.75
self.table[25][13] = 1
self.table[25][14] = 1
self.table[25][15] = 1
self.table[25][16] = 1
self.table[25][17] = 1
self.table[25][18] = 1
self.table[25][19] = 1.25

self.table[26] = {}
self.table[26][0] = 0
self.table[26][1] = 0.25
self.table[26][2] = 0.25
self.table[26][3] = 0.5
self.table[26][4] = 0.5
self.table[26][5] = 0.5
self.table[26][6] = 0.5
self.table[26][7] = 0.5
self.table[26][8] = 0.5
self.table[26][9] = 0.75
self.table[26][10] = 0.75
self.table[26][11] = 0.75
self.table[26][12] = 0.75
self.table[26][13] = 1
self.table[26][14] = 1
self.table[26][15] = 1
self.table[26][16] = 1
self.table[26][17] = 1
self.table[26][18] = 1
self.table[26][19] = 1.25

self.table[27] = {}
self.table[27][0] = 0
self.table[27][1] = 0.25
self.table[27][2] = 0.5
self.table[27][3] = 0.5
self.table[27][4] = 0.5
self.table[27][5] = 0.5
self.table[27][6] = 0.5
self.table[27][7] = 0.5
self.table[27][8] = 0.5
self.table[27][9] = 0.75
self.table[27][10] = 0.75
self.table[27][11] = 0.75
self.table[27][12] = 1
self.table[27][13] = 1
self.table[27][14] = 1
self.table[27][15] = 1
self.table[27][16] = 1
self.table[27][17] = 1
self.table[27][18] = 1
self.table[27][19] = 1.25

	return o
end


-- resolutionTable class methods.
function ResolutionTable:get_damage_multiplier( collumn, dice_roll )
	return self.table[collumn + 7][dice_roll]
end